package com.itheima.web.controller.sms;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.service.sms.ICouponHistoryService;
import com.itheima.utils.ResultData;
import com.itheima.vo.sms.CouponHistory;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * 优惠券使用、领取历史表 前端控制器
 *
 */
@RestController
@RequestMapping("/couponHistory")
public class CouponHistoryController {
    @DubboReference
    private ICouponHistoryService couponHistoryService;
    @GetMapping("/list")
    public ResultData list(Long couponId, String orderSn, Integer pageNum, Integer pageSize, Integer useStatus){
        Page<CouponHistory> page= couponHistoryService.getPage(couponId,orderSn,useStatus,pageNum,pageSize);
        return ResultData.ok("",page);
    }
}

